<?php
// 获取点击最多文章
// header("content-type:text/html;charset=UTF-8");
include_once("conn.php");

$select_click = "SELECT * FROM tips_infos ORDER BY tips_Click DESC";

$result_click = mysqli_query($connect_DB, $select_click);

if ($result_click) {
    if (mysqli_num_rows($result_click) > 0) {
        $count = 1;
        while ($row_click = mysqli_fetch_object($result_click)) {
            echo "
                <li>
                    <div class='xuhao'>" . $count . "</div>
                    <div class='biaoti'><a href='user_Tips.php?id=" . $row_click->tips_ID . "'>" . $row_click->tips_Title . "</a></div>
                    <div class='shijian'>" . substr($row_click->tips_Date, 0, 10) . "</div>
                </li>
            ";
            $count++;
        }
    }else{
        echo "<li class='none-tips'> 暂无数据 </li>";
    }
}else{
    echo "<li class='none-tips'> 查询出错".$select_click." </li>";
}

$connect_DB->close();
?>